<template>
  <div>
    <div class="content-body">
      <div class="warp-content">
        <Top></Top>
        <BasicInfo></BasicInfo>
      </div>
      <div class="main-body">
<!--        <div class="card-list" @click="showModal">-->
<!--          <div class="card-left">-->
<!--            <div class="image">-->
<!--              <img :src="icons.ry" />-->
<!--            </div>-->
<!--            <div class="cont">添加销售人员</div>-->
<!--          </div>-->
<!--          <div class="card-right">-->
<!--            <img class="image-right" :src="icons.right" />-->
<!--          </div>-->
<!--        </div>-->
        <div class="card-list" @click="goToCode">
          <div class="card-left">
            <div class="image">
              <img :src="icons.xs" />
            </div>
            <div class="cont">创建扫码订单</div>
          </div>
          <div class="card-right">
            <img class="image-right" :src="icons.right" />
          </div>
        </div>
        <div class="card-list" @click="goToZx">
          <div class="card-left">
            <div class="image">
              <img :src="icons.xs" />
            </div>
            <div class="cont">生成支付订单</div>
          </div>
          <div class="card-right">
            <img class="image-right" :src="icons.right" />
          </div>
        </div>
        <!--        <div class="card-list">-->
        <!--          <div class="card-left">-->
        <!--            <div class="image">-->
        <!--              <img :src="icons.xx">-->
        <!--            </div>-->
        <!--            <div class="cont">生成离线订单</div>-->
        <!--          </div>-->
        <!--          <div class="card-right">-->
        <!--            <img class="image-right" :src="icons.right">-->
        <!--          </div>-->
        <!--        </div>-->
      </div>
    </div>
    <!--    <nut-popup :style="{ padding: '30px 50px' }" v-model="modalOpened">正文</nut-popup>-->
  </div>
</template>

<script>
  import store from "@/store/store";
  import Top from "@/components/Top";
  import BasicInfo from "@/components/BasicInfo";

  export default {
    components: {
      Top,
      BasicInfo
    },
    computed: {
      companyId() {
        return store.state.companyId;
      }
    },
    data() {
      return {
        motto: "Hello miniprograme",
        modalOpened: false,
        icons: {
          xx: require(`@/common/image/xx.png`),
          ry: require(`@/common/image/ry.png`),
          xs: require(`@/common/image/xs.png`),
          right: require(`@/common/image/right-icon2.png`)
        },
        userInfo: {
          nickName: "this.mpvue",
          avatarUrl: "http://this.mpvue.com/assets/logo.png"
        }
      };
    },
    methods: {
      bindViewTap() {
        const url = "/pages/logs/index";
        this.mpvue.navigateTo({ url });
      },
      clickHandle(ev) {
        console.log("clickHandle:", ev);
        // throw {message: 'custom test'}
      },
      onModalClick() {},
      onModalClose() {},
      showModal() {
        const url = "/pages/addSellers/index";
        this.mpvue.navigateTo({ url });
      },
      goToZx() {
        const url = "/pages/tradPay/index";
        this.mpvue.navigateTo({ url });
      },
      goToCode() {
        const url = "/pages/scan/index";
        this.mpvue.navigateTo({ url });
      }
    },

    created() {
      // let app = getApp()
    },
    onUnload() {
      store.commit("clearCompanyName");
    }
  };
</script>
<style scoped lang="scss">
  @import "../../common/common";

  .main-body {
    background-color: #fff;
    min-height: 200px;

    .card-list {
      padding: 10px 20px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      display: flex;
      font-size: 18px;
      align-items: center;
      height: 50px;
      justify-content: space-between;
      cursor: pointer;

      .card-left {
        display: flex;
        align-items: center;
      }

      .image {
        width: 30px;
        height: 30px;
        margin-right: 20px;
        /*border: 1px solid #000;*/

        img {
          width: 100%;
          height: 100%;
        }
      }

      .cont {
        color: #333;
        font-weight: lighter;
      }
    }
  }

  .image-right {
    width: 8px;
    height: 14px;
  }
  .warp-content {
    box-sizing: border-box;
  }
</style>
